package com.example.xpvideo.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 优惠券表
(PurchaseCoupon)实体类
 *
 * @author 杨丽辉
 * @since 2021-07-22 14:12:45
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PurchaseCoupon implements Serializable {
    private static final long serialVersionUID = -19650367502022026L;
        /**
    *主键
    * ${column.comment}
    * isnull 1
    */
        private Integer couponId;

    /**
    * 优惠券额度
    * isnull 0
    */            private BigDecimal couponQuota;
    /**
    * 优惠券的张数
    * isnull 0
    */            private Integer couponCount;
    /**
    * 优惠券开始有效日期
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
            private LocalDateTime couponStartTime;
    /**
    * 优惠券结束有效日期
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
            private LocalDateTime couponEndTime;
    /**
    * 优惠券的使用说明
    * isnull 0
    */            private String instructionsForUse;
    /**
    * 商品ID
    * isnull 0
    */            private Integer belongId;
    /**
    * 满减金额的额度
    * isnull 0
    */            private BigDecimal fullReduction;
    /**
    * 0默认有效，1为失效2下架,3删除
    * isnull 0
    */            private Integer couponStage;
    /**
    * 优惠券作用类型，1满减，2立减，3折扣
    * isnull 0
    */            private Integer effectType;
    /**
    * 优惠券类型，1指定商品，2全场通用
    * isnull 0
    */            private Integer couponType;
    /**
    * 优惠券总库存
    * isnull 0
    */            private Integer totalInventory;
            @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
            private LocalDateTime creatTime;
        
    public Integer getCouponId() {
        return couponId;
    }

    public void setCouponId(Integer couponId) {
        this.couponId = couponId;
    }
        
    public BigDecimal getCouponQuota() {
        return couponQuota;
    }

    public void setCouponQuota(BigDecimal couponQuota) {
        this.couponQuota = couponQuota;
    }
        
    public Integer getCouponCount() {
        return couponCount;
    }

    public void setCouponCount(Integer couponCount) {
        this.couponCount = couponCount;
    }
        
    public LocalDateTime getCouponStartTime() {
        return couponStartTime;
    }

    public void setCouponStartTime(LocalDateTime couponStartTime) {
        this.couponStartTime = couponStartTime;
    }
        
    public LocalDateTime getCouponEndTime() {
        return couponEndTime;
    }

    public void setCouponEndTime(LocalDateTime couponEndTime) {
        this.couponEndTime = couponEndTime;
    }
        
    public String getInstructionsForUse() {
        return instructionsForUse;
    }

    public void setInstructionsForUse(String instructionsForUse) {
        this.instructionsForUse = instructionsForUse;
    }
        
    public Integer getBelongId() {
        return belongId;
    }

    public void setBelongId(Integer belongId) {
        this.belongId = belongId;
    }
        
    public BigDecimal getFullReduction() {
        return fullReduction;
    }

    public void setFullReduction(BigDecimal fullReduction) {
        this.fullReduction = fullReduction;
    }
        
    public Integer getCouponStage() {
        return couponStage;
    }

    public void setCouponStage(Integer couponStage) {
        this.couponStage = couponStage;
    }
        
    public Integer getEffectType() {
        return effectType;
    }

    public void setEffectType(Integer effectType) {
        this.effectType = effectType;
    }
        
    public Integer getCouponType() {
        return couponType;
    }

    public void setCouponType(Integer couponType) {
        this.couponType = couponType;
    }
        
    public Integer getTotalInventory() {
        return totalInventory;
    }

    public void setTotalInventory(Integer totalInventory) {
        this.totalInventory = totalInventory;
    }
        
    public LocalDateTime getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(LocalDateTime creatTime) {
        this.creatTime = creatTime;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"couponId\":" + couponId +
                                  " ,\"couponQuota\":" + couponQuota +
                            " ,\"couponCount\":" + couponCount +
                            " ,\"couponStartTime\":" + couponStartTime +
                            " ,\"couponEndTime\":" + couponEndTime +
                            " ,\"instructionsForUse\":" + instructionsForUse +
                            " ,\"belongId\":" + belongId +
                            " ,\"fullReduction\":" + fullReduction +
                            " ,\"couponStage\":" + couponStage +
                            " ,\"effectType\":" + effectType +
                            " ,\"couponType\":" + couponType +
                            " ,\"totalInventory\":" + totalInventory +
                            " ,\"creatTime\":" + creatTime +
                  '}';
    }


}
